{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "c2b7da21-f761-4b32-9b9e-f8985e2f8dc9",
   "metadata": {},
   "source": [
    "Ch16 数组变形\n",
    "# 数组变形\n",
    "Book_1《编程不难》 | 鸢尾花书：从加减乘除到机器学习  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "id": "83190748-4ad1-4ca2-aba2-8d3d02150be0",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入包\n",
    "import numpy as np\n",
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "import math\n",
    "from matplotlib import cm \n",
    "# 导入色谱\n",
    "\n",
    "import os\n",
    "\n",
    "# 如果文件夹不存在，创建文件夹\n",
    "if not os.path.isdir(\"Figures\"):\n",
    "    os.makedirs(\"Figures\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "957fd1e4-18f8-4d6e-bed3-1ec803bf8d08",
   "metadata": {},
   "source": [
    "### 定义可视化函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "id": "89adf3a5-e87c-4175-bd58-f5f340c727f6",
   "metadata": {},
   "outputs": [],
   "source": [
    "def visualize_2D(array, title, vmax, vmin):\n",
    "    \n",
    "    fig_width  = math.ceil(array.shape[1] * 0.5)\n",
    "    fig_length = math.ceil(array.shape[0] * 0.5)\n",
    "    \n",
    "    fig, ax = plt.subplots(figsize=(fig_width, fig_length))\n",
    "    # 注意，seaborn.heatmap() 目前只能接受2D数组\n",
    "    # 本书中，一维数组可视化时用圆圈\n",
    "    # 可视化时，只有二维、三维数组用方块\n",
    "    \n",
    "    sns.heatmap(array, \n",
    "                vmax = vmax,\n",
    "                vmin = vmin,\n",
    "                annot = True,      # 增加注释\n",
    "                fmt = \".0f\",       # 注释数值的格式\n",
    "                square = True,     # 热图方格为正方形\n",
    "                cmap = 'RdYlBu_r', # 指定色谱\n",
    "                linewidths = .5,   # 方格线宽\n",
    "                cbar = False,      # 不显示色谱条\n",
    "                yticklabels=False, # 不显示纵轴标签\n",
    "                xticklabels=False, # 不显示横轴标签\n",
    "                ax = ax)           # 指定绘制热图的轴\n",
    "    \n",
    "    fig.savefig('Figures/' + title + '.svg', format='svg')\n",
    "\n",
    "# 定义绘制一元数组可视化函数\n",
    "\n",
    "def visualize_1D(array, title):\n",
    "    fig, ax = plt.subplots()\n",
    "\n",
    "    colors = cm.RdYlBu_r(np.linspace(0,1,len(array)))\n",
    "\n",
    "    for idx in range(len(array)):\n",
    "\n",
    "        circle_idx = plt.Circle((idx, 0), 0.5, facecolor=colors[idx], edgecolor = 'w')\n",
    "        ax.add_patch(circle_idx)\n",
    "        ax.text(idx, 0, s = str(array[idx]),\n",
    "                horizontalalignment = 'center',\n",
    "                verticalalignment = 'center')\n",
    "\n",
    "    ax.set_xlim(-0.6, 0.6 + len(array))\n",
    "    ax.set_ylim(-0.6, 0.6)\n",
    "    ax.set_aspect('equal', adjustable='box')\n",
    "    ax.axis('off')\n",
    "    fig.savefig('Figures/' + title + '.svg', format='svg')\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9c4b17a5-1768-4468-86ee-158ac55d996b",
   "metadata": {},
   "source": [
    "### 生成1D数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "id": "f6d905c9-28ce-4cb3-a15a-4cf47d5c56aa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-7, -6, -5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5,  6,  7])"
      ]
     },
     "execution_count": 132,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array = np.arange(-7, 7 + 1)\n",
    "a_1D_array"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "96f60db2-7216-4338-9235-676c3135051b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAA4CAYAAABg+fsQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24z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3RabZkRcChSCnBNBGqijQMGrftJlwXrdLozEjHP7igdZ8JFqcYv070qhiwsbGxsbGx+d/n6z/RYWNjY2NjY5MUthiwsbGxsbE5wrHFgI2NjY2NzRGOLQZsbGxsbGyOcGwxYGNjY2Njc4RjiwEbGxsbG5sjHFsM2NjY2NjYHOHYYsDGxsbGxuYIxxYDNjY2NjY2Rzi2GLCxsbGxsTnCscWAjY2NjY3NEY4tBmxsbGxsbI5w/h+gUTmulXqaMQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_1D(a_1D_array, '1D数组')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "686d7426-aced-4c7e-8974-5646a4850c03",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "15"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(a_1D_array)\n",
    "# 长度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "436c7172-3db2-43af-85a8-958dde7b7ed8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(15,)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 形状\n",
    "a_1D_array.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "2ca23d48-d2cb-4edd-8d33-afd5da700f36",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 维数\n",
    "a_1D_array.ndim"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dd24a96e-4507-44fb-b784-adf41ff0a009",
   "metadata": {},
   "source": [
    "### 变形为行向量，1行15列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "970e71c6-412d-455d-9eff-d846e7c6c14a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_row_vector = a_1D_array.reshape(1,-1)\n",
    "# 有时候，当你想要改变数组的形状，但是不确定新的形状应该是多少时，你可以使用 -1 这个特殊值来指定某一个维度的大小\n",
    "a_row_vector"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "e48533f9-6c74-4dee-ac44-6e72aff12729",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.reshape(a_1D_array, (1,-1))\n",
    "# 把numpy.reshape() 当成一个函数来用"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "86948ba7-1a34-4f72-a5f0-58393d0b81a5",
   "metadata": {},
   "outputs": [],
   "source": [
    "np.reshape(a_1D_array, (1,15))\n",
    "# 把numpy.reshape() 当成一个函数来用"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "id": "63aae20a-9a8a-4a3f-a909-e0b0ce7ea466",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAA9CAYAAAA9BtihAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAPjElEQVR4nO3ceViUVcMG8HsYlmGGHWQTEBVwQ03TLCXUxFy+tF7LvavcTcvK/FID09JM883MXMoKtXKr3DKX0iz31wW3BBEQRZR1QPZt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iNj757gLGDm6D10c/gtu5ZZi/9l+4cl38iiUAmMxAsI8GT7b3g8bJHkUVOlzNLMbKvcmo1kvv85mkzM7ODgVZmfjzyK+oLC2Bs6sbAsPaYtwHq+AbIo23ie5q83Hh5DEAwLwJY6z+LnblF2jXpVt9X2ZzJ46cxJIFSyzj9+a8DwAYP3UcJkybICqWxeDB3VBUXI61a/YhX1uKiPBAfLnuNTRvLr6c/iUxJRcvv77VMl66+ncAwHMDI7E0ThqHqbYeTgcAvLT4iNX8h1O6Y1i0NF4zAFBYrsfcXenQluvh6qREhJ8aX45ti56tpXdYRcqUPn7wnrMYdm4eMJUUoSYlEfkzx8OYnys6mpWKK4lImzYDwW+/heYzpqPm9h3c+mAJCvdIq6j6x/SEpkVz3BBw+vcvwgrgzt1XsXP3VVEPf98OnMjAgRMZomPUS28wYemOK01fKDGi9v01xt7RCSNmLxIdo1HNAgLx3bGEpi8UbPCzgzD42UGiYzRq7Jg+GDumj+gYDerRJQTXjos73HM/rm0aITrCffng2VaiI/yf1KybLTqClbsfxTZ9kUQU/3EExX8cER2jUbmHTmKLoo3QDMI/B5CIiIiIbIsFkIiIiEhmWACJiIiIZIYFkIiIiEhmWACJiIiIZIYFkIiIiEhmWACJiIiIZIYFkIiIiEhmWACJiIiIZIYFkIiIiEhmWACJiIiIZIYFkIiIiEhmWACJiIiIZIYFkIiIiEhmWACJiIiIZEZhNpvNokMQERERke1wBZCIiIhIZlgAiYiIiGSGBZCIiIhIZlgAiYiIiGSGBZCIiIhIZlgAiYiIiGSGBZCIiIhIZlgAiYiIiGSGBZCIiIhIZv4NzOnZQYLwhPIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 800x100 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(a_row_vector, '行向量', 7, -7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "4adf5158-d31c-4ade-bcfb-8d7b768dec58",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1, 15)"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 形状\n",
    "a_row_vector.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "850dab8f-01fa-4235-8a4d-f1f7c7215a07",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 维数\n",
    "a_row_vector.ndim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "32a67eaa-5bee-4921-be0d-e0eed6954b15",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(1,15) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "3df24ced-8ee6-479d-98a0-aab470c9ba50",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(-1,15) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "41f3ccc2-ffe6-47e1-bb54-bf37ef9a47b6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(1,len(a_1D_array)) "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "516eff30-b7f0-4022-9de1-6f3759ef4c31",
   "metadata": {},
   "source": [
    "### 改成列向量，15行1列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "b4e8f60c-7d3f-4452-943b-56dc50ef3506",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7],\n",
       "       [-6],\n",
       "       [-5],\n",
       "       [-4],\n",
       "       [-3],\n",
       "       [-2],\n",
       "       [-1],\n",
       "       [ 0],\n",
       "       [ 1],\n",
       "       [ 2],\n",
       "       [ 3],\n",
       "       [ 4],\n",
       "       [ 5],\n",
       "       [ 6],\n",
       "       [ 7]])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_col_vector = a_1D_array.reshape(-1,1)\n",
    "a_col_vector"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "id": "c1007cf7-a93a-4905-9385-a04b9bcc0e2d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAD0AAAJ8CAYAAABN+akJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAASFUlEQVR4nO2dd3xU1bbHf5NJnUklIQmBNFJoQUTBAkiR2FBQsdD8KAqCqFcFn8Il9+q9YuU9LnIBFQugAgFFitIEUZByKSEBSQgkBEMgGdL7TKa/P3yMjiiZaM46T9f6fj58PuydnVnrm73POZN9Vs5onE6nE8zwUjsBNRBpLog0F0SaCyLNBZbS3m0ZfNW1bymVR7uQffBxj8axnGmR5oJIc0GkuSDSXBBpLog0F9r0W1Z78Wu/Db25cD8+WnFU8fiqSN902zK39sAB8XghYxh2fn2GJL4q0tU1Jrf2kMEJyDpSitKyBpL4qh/THToEYNDAeGz4PJ8spurSI0d0g7HZiq930SxtgGB533ZLCjJmDXW1/zJ9E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tcFPN8NJZdWEtkCvgwizQWR5oJIc0GkuSDSXBBpLog0F1hKS/Fca6zSdFMqj3ZhvPOUR+NYLm+R5oJIc0GkuSDSXBBpLrCUJq05GfX9TgQmdLmkv2DxSmQ9+RJZHqTSX/a/Fxqt1tUOSUvB8K+Wo+TTbZRp0Eqbq2rd2j1nTUHj6bOo2H2IMg0VP6DXxwcJD4xC0dLP6GOTR/w/utyVDt/QIHy/fD15bNWkkybdA8PWb2EyVJDHVkVaFxeDqPQBOP3+WjXCqyOd9PBomCuqUbZ5lxrhVZDWaND14dE48+EGOFV4UCqggnR0+gDo4zvjjApn7Yu0ad9btoD/wIg0F0SaCyLNBZHmgkhzQaS5INJcYCnNsniO5UyLNBdEmgsizQWR5sL/AinKZHwTgnMKAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 100x800 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(a_col_vector, '列向量', 7, -7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "id": "1fa33350-8b0f-4fab-a409-540680108239",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(15, 1)"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_col_vector.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "id": "29e1208d-226a-4e30-9b5d-a2993d085b88",
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7],\n",
       "       [-6],\n",
       "       [-5],\n",
       "       [-4],\n",
       "       [-3],\n",
       "       [-2],\n",
       "       [-1],\n",
       "       [ 0],\n",
       "       [ 1],\n",
       "       [ 2],\n",
       "       [ 3],\n",
       "       [ 4],\n",
       "       [ 5],\n",
       "       [ 6],\n",
       "       [ 7]])"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(-1,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "992d541e-f490-403e-926f-c5b42382c8d0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7],\n",
       "       [-6],\n",
       "       [-5],\n",
       "       [-4],\n",
       "       [-3],\n",
       "       [-2],\n",
       "       [-1],\n",
       "       [ 0],\n",
       "       [ 1],\n",
       "       [ 2],\n",
       "       [ 3],\n",
       "       [ 4],\n",
       "       [ 5],\n",
       "       [ 6],\n",
       "       [ 7]])"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.reshape(a_1D_array, (-1,1))\n",
    "# 把numpy.reshape() 当成一个函数来用"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "08bd48dd-10e1-4ca8-9297-34ce83255893",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7],\n",
       "       [-6],\n",
       "       [-5],\n",
       "       [-4],\n",
       "       [-3],\n",
       "       [-2],\n",
       "       [-1],\n",
       "       [ 0],\n",
       "       [ 1],\n",
       "       [ 2],\n",
       "       [ 3],\n",
       "       [ 4],\n",
       "       [ 5],\n",
       "       [ 6],\n",
       "       [ 7]])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.reshape(a_1D_array, (15,1))\n",
    "# 把numpy.reshape() 当成一个函数来用"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "d81920ca-6d1a-463e-980f-db6239d0e47e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7],\n",
       "       [-6],\n",
       "       [-5],\n",
       "       [-4],\n",
       "       [-3],\n",
       "       [-2],\n",
       "       [-1],\n",
       "       [ 0],\n",
       "       [ 1],\n",
       "       [ 2],\n",
       "       [ 3],\n",
       "       [ 4],\n",
       "       [ 5],\n",
       "       [ 6],\n",
       "       [ 7]])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.reshape(a_1D_array, (len(a_1D_array),1))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cb1204b2-1f67-47e5-8b6b-890e797d193d",
   "metadata": {},
   "source": [
    "### 改成 3 行 5 列，先行后列\n",
    "请大家试着将一维数组写成2行 8列数组，看一下是否报错"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "id": "51ab495d-f96b-4f57-807a-e0145fa142de",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3],\n",
       "       [-2, -1,  0,  1,  2],\n",
       "       [ 3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 133,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5 = a_1D_array.reshape(3, 5)\n",
    "# 先行后列为默认顺序\n",
    "A_3_by_5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "id": "4ea6b0aa-cdd3-4591-9d47-7fc31ca701ec",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPwAAACfCAYAAADdy7STAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAQSElEQVR4nO3deVjUdQLH8c8wnMN9yCUgKqAiapaWKaEmZrmr29rh1VNeadppbmpQWpmrtVm52kGFWWlamVoplqZpouuBoAkiIIoo53DfMNf+sU/jTiXM8Oh8x76f1/P4PH1/Tvl56nnPZc4oDAaDAUQkBTvRA4jIehg8kUQYPJFEGDyRRBg8kUQYPJFEGDyRRBg8kUQYPJFEGDyRROwtufHNt717vXZcV+lH52HEzC2iZ1hsf/L9mLzqg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y7+fFD3FIm05mahetRSaootQevnCY9JM+L+RjLK5E6GvrxU976qcwkIRMHUySpLXo/i9JLgN6I/wJYkwtLWhYts3oueZLeTeeDh6uePC+m3CNggNPtzPGVsf64f6Fi12n6lCwvZ8fDKtj01Hr/D0g+P4x9DyUQKg1YieY5GWtMPGv9YiHxXZvyAweTtU8X9Fw7aNApd1QKFAY2YWLq96CwDQdCYbLpER8J8y+YYKvufM+1Cy62c0l5QL2yA0eEelHbr5OAMAYoLdkFnciM+OlOHlcd1FzmqXXUgkFO7ecH5qrfGaQqmEXfcY2A8dj+aEcYBBL3Ch+QytLdBczId9cKjoKe3SqNVozjtncq35XD58xtwlaJHlVGHBCIgfioMTxD4rFBr8bxkAaHS2HYvu3Ek0r5pjcs3xwQUwlF+CZv+XN0zsAAB7B9iHhqM107bfh6g/kQHnHqYPAs7dw9FaXCxokeV6Tp+A1vJKFO/cL3SHsODf2nsJd0R4IsjTCY2tOqRkVuJ4QR0+mGrjn2Xe2gxD2UXTa20tMDTV/f66jfGc+TSajx6ETl0KpZc33CfNhJ3KFU17d4ie1q7SdesR/dUmBM+dg8qUXXDr3x/+kx7EhcQloqeZR6FAj+kTcP6T7TAI/m1QYcFXNmiweFs+1A0auDspERWgwgdTe2NoT09Rk/70lH4B8F20HHYeXtDXVqM1JxPl86dDV14qelq7Gk9nIm/ukwh97ll0fXIeWi9dxsVXV6DyW9u+o/pVYPxQuHbrivMC353/lbDgX/1bD1G/9DXXmrRQ9ASzVL2W0PGNbFTNT/tR89N+0TM6pXTPIZv5Nhub+H14IrIOBk8kEQZPJBEGTyQRBk8kEQZPJBEGTyQRBk8kEQZPJBEGTyQRBk8kEQZPJBEGTyQRBk8kEQZPJBEGTyQRBk8kEQZPJBGFwWAwiB5BRNbBR3giiTB4IokweCKJMHgiiTB4IokweCKJMHgiiTB4IokweCKJ/Bc47vZSqz3AswAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 300x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3_by_5, '矩阵，3 x 5', 7, -7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "id": "8fa6e56c-ea2f-4aa7-ba3c-1586f1397adc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3],\n",
       "       [-2, -1,  0,  1,  2],\n",
       "       [ 3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(3, -1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "443a48d7-bb06-4b65-b6e3-45832a4a4539",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3],\n",
       "       [-2, -1,  0,  1,  2],\n",
       "       [ 3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(-1, 5)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0c1884bd-53ed-4a8e-9dca-cfee0cdc7086",
   "metadata": {},
   "source": [
    "### 改成 3 行 5 列，先列后行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "7253dfa7-bf19-4c16-a204-3b9fdcc3b5bd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -4, -1,  2,  5],\n",
       "       [-6, -3,  0,  3,  6],\n",
       "       [-5, -2,  1,  4,  7]])"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5_col_order = a_1D_array.reshape(3, 5, order = 'F')\n",
    "A_3_by_5_col_order"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "id": "128a5592-6b43-4609-a25a-b04eb6b14fac",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "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dHOHn4yJwWTPqamAouGR6TVMLQ3XF369bIoUCXaeOw8UNO2DQNX2H196EBq83AAGeKtzRywcqexuUVmlwLrsMq3amolYr9hemOSXqQpxK+AUAMH/aJJP/Fr3qA/Ts21/ErCYlp+Xj8ee2GM/L1uwHANw/MgzLYu4RNeuG1zFqEFSdO+GiwFfn/yA0eG29Hsu+PityQpt5+fph4y+Jzd/QggzsG4jzh26MFxXrYl8SPaHF8vcmWMyn2VjE9+GJyDwYPJFEGDyRRBg8kUQYPJFEGDyRRBg8kUQYPJFEGDyRRBg8kUQYPJFEGDyRRBg8kUQYPJFEGDyRRBg8kUQYPJFEGDyRRBQGg+H6+bQHIvpHeA9PJBEGTyQRBk8kEQZPJBEGTyQRBk8kEQZPJBEGTyQRBk8kkf8DXjHyv/E+n8gAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 300x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3_by_5_col_order, '矩阵，3 x 5, 先列后行', 7, -7)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5363d8d4-8bd4-499a-a35b-580ce6d4ff4b",
   "metadata": {},
   "source": [
    "### 改成 5 行 3 列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "0c48a25f-a355-4df3-9449-f3b56f6a8ca3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5],\n",
       "       [-4, -3, -2],\n",
       "       [-1,  0,  1],\n",
       "       [ 2,  3,  4],\n",
       "       [ 5,  6,  7]])"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_5_by_3 = a_1D_array.reshape(5, 3)\n",
    "A_5_by_3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "cbd40c7f-2348-4e25-a51f-b2c9d6132344",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5],\n",
       "       [-4, -3, -2],\n",
       "       [-1,  0,  1],\n",
       "       [ 2,  3,  4],\n",
       "       [ 5,  6,  7]])"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(5, -1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "bc09a658-5195-4c74-89de-002c832e7623",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5],\n",
       "       [-4, -3, -2],\n",
       "       [-1,  0,  1],\n",
       "       [ 2,  3,  4],\n",
       "       [ 5,  6,  7]])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(-1, 3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "17e59b00-937d-46aa-b7e8-55f47e076a89",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5],\n",
       "       [-4, -3, -2],\n",
       "       [-1,  0,  1],\n",
       "       [ 2,  3,  4],\n",
       "       [ 5,  6,  7]])"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(5, int(len(a_1D_array)/5))\n",
    "# 形状参数必须是整数，不能是float"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "id": "05a134c7-a0b5-4d63-bd30-aaaf46017444",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAJ4AAAD7CAYAAACbvC2SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAARSklEQVR4nO3df1TThf7H8dc2fm78FARBQUTAXxh50yw11MQySysrS+10tUyz3+bVTPpx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I+3Cd6A6XCQ9u7nCLiIK5slx6SavqfsmAV3Tze615dYlCY1GR0CLndJ00Bo2lFSj6dqfoDrHw/B96Ch7xf4MmNBwe3XohKHk+1Fod9Ds2SU1yyNmPPobP1QkInzYVnp0jETTqNoTcNxYlK1347cHvVCpETxqDE59sgFX4j67E3uNpgkMR9OxrUPsFwFJThcacTJROnwRz6VmpSQ6pP5yJ3GlPIGLmM+j4xKNoPH0Gp16dh4qvXfs/GADokDQAus4dceKjL6WnyIVXOX+O/Qe5qOofd6L6x53SM5x2dvsel/l2Atd5j0dXFIZHIhgeiWB4JILhkQiGRyIYHolgeCSC4ZEIhkciGB6JYHgkguGRCIZHIhgeiWB4JILhkQiGRyJ490YSwSseiWB4JILhkQiGRyIYHolgeCSC4ZEIhkciGB6J+C91hgY+4Ih5fQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 200x300 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_5_by_3, '矩阵，5 x 3, 先行后列', 7, -7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "7ce8bca5-5729-4b22-883f-ca7633422349",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -2,  3],\n",
       "       [-6, -1,  4],\n",
       "       [-5,  0,  5],\n",
       "       [-4,  1,  6],\n",
       "       [-3,  2,  7]])"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_5_by_3_col_order = a_1D_array.reshape(5, 3, order = 'F')\n",
    "A_5_by_3_col_order"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "id": "a6173d8e-908a-477b-8d81-d839d45c9718",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAJ4AAAD7CAYAAACbvC2SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNp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mrUzF2UsV+PK1m+vctYjJD6Fgxz7UFxSLzWDV8KJ79kGbqE6mtZv3L6+JHJyc4R0UAu+gEIREd8bSp8Yjbfd2xI8cb83xLDJvZSp+TM3Hqlf7I9BHLT1Oi6nDghEwsDeSRz4jOodVw3N0VsPRufn/SEYYoddqrDCR5YxGI+Z9noYfUvLweWI/hPi7So9kkYiJI9FYXIb8bXtE5xB9jadpqMf+b1YhumdvuHr6oL6mCinfbUJVWQk63dVPcrRrmvtZKrb+JxdLX+gDFyc7lFTUAwDc1PZwclDES+ZrU6nQfuJInF+5CUa9XnQU0b8pGxsblObl4uc936OuqhLObu4IjuyICW8uhn9Yu+b/AAFrdmcDAB57a4/Z/j+n9sTIvsqc+VeBA3vDpW0bnBd8N/sr0fDsHBwx6pV5kiNY7MyqUdIj3LDCXQcUc3cCRX0fj24dDI9EMDwSwfBIBMMjEQyPRDA8EsHwSATDIxEMj0QwPBLB8EgEwyMRDI9EMDwSwfBIBMMjEQyPRPD0RhLBZzwSwfBIBMMjEQyPRDA8EsHwSATDIxEMj0QwPBLxXzS/GVdCb8iEAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 200x300 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_5_by_3_col_order, '矩阵，5 x 3, 先列后行', 7, -7)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "66f1c225-98e2-4e50-8138-8badf98a94e4",
   "metadata": {},
   "source": [
    "### 从 3 * 5 到 5 * 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "id": "8fba7a79-47e2-49eb-b9d4-8a5512e54e03",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5],\n",
       "       [-4, -3, -2],\n",
       "       [-1,  0,  1],\n",
       "       [ 2,  3,  4],\n",
       "       [ 5,  6,  7]])"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5.reshape(5,3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "id": "b1e29ba3-f99a-4228-a27a-f78907338ee0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAJ4AAAD7CAYAAACbvC2SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAARSklEQVR4nO3df1TThf7H8dc2fm78FARBQUTAXxh50yw11MQySysrS+10tUyz3+bVTPpxy7pmJzNTK2+ZlT/IstQyNc3SRK8mgSaICCqigPz+JRtsbLt/dFtfUthm8nnPr6/HOZ3T59Nsr3N89tnwtH1UVqvVCiKFqaUH0JWJ4ZEIhkciGB6JYHgkguGRCIZHIhgeiWB4JILhkQg3Zx78t/7vttWONpO+/1EMeWid9Ayn7Vx+N8Yt2CU946KkzBhs9zG84pEIhkciGB6JYHgkguGRCIZHIhgeiWB4JILhkQiGRyIYHolgeCSC4ZEIhkciGB6JcOr/x2sL6fsfveD5txfvxaerDio7xkmRYb6YendvJMS1h1oN5BfW4p/v70NppUF6WoseubkbBsd3aHYut6gWL6ZkKLpDPLzht6xodjxwQGe8mDwUO344IbTIMeHtdVg8ewg2787Hio1HUK83oXO4L4wmi/Q0uw6erMT7W4/ajpssyn99jnh4FX+6OgxOjELaL4UoLKoVWuSYyWPisf/wWSxbd9h2rri8XnCR40xmC2r0JtEN4uH9X+3aeWPQwM546eUfpKe0SqUCrruqA1K2HMMb0wchNjIAxeV6rNl8FKkZRdLz7OrZKQDvT7se+oYmZJ+pwdrUk6g1KBuiS/1wMWpkN+jrTfhhp2u/zAb6ekLr5Y7xI7vh58wSzHxrN1LTC/HKo9cjIS5Yel6rDuZXYunmbLz6+SGs2nUC0R188fzYBLhpVIruUPSKd8vNsUiePcR2/MT0Tcg4WGw7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+dTIai4tx4tk5tnPGwkLBRY5pLG9+V8yes6egLu8USnf9LLJHNDy3jpEIW7kFVpMRxpws1HyyFOazrv2bGDjsRlTvTkXM4rfh178fjGdLULI6BWVrv5Ce5jC1uzui7h+No2+tkNsg9cTGnExULXgJZS88jqp3XoMmMAghby6H2te1b1TiGRmB0Anj0JB/CkcnTkZpylpEvZiM4Dtvl57msE53JMEjwBcnP14vtkHsiteQttf29004jvLsX9Fh+QZok27DufWrpWbZp1KhPjMLZxYsBADoj2TDOzYGIePHoXz9RuFxjun60F0o3vITDMWlYhtc5o9TrI0NMJ06DrfwCOkprTKVlcGQm9fsnCHvODzDw4QWOUcbGY7QpAHI+3Cd6A6XCQ9u7nCLiIK5slx6SavqfsmAV3Tze615dYlCY1GR0CLndJ00Bo2lFSj6dqfoDrHw/B96Ch7xf4MmNBwe3XohKHk+1Fod9Ds2SU1yyNmPPobP1QkInzYVnp0jETTqNoTcNxYlK1347cHvVCpETxqDE59sgFX4j67E3uNpgkMR9OxrUPsFwFJThcacTJROnwRz6VmpSQ6pP5yJ3GlPIGLmM+j4xKNoPH0Gp16dh4qvXfs/GADokDQAus4dceKjL6WnyIVXOX+O/Qe5qOofd6L6x53SM5x2dvsel/l2Atd5j0dXFIZHIhgeiWB4JILhkQiGRyIYHolgeCSC4ZEIhkciGB6JYHgkguGRCIZHIhgeiWB4JILhkQiGRyJ490YSwSseiWB4JILhkQiGRyIYHolgeCSC4ZEIhkciGB6J+C91hgY+4Ih5fQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 200x300 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3_by_5.reshape(5,3), '从 3 X 5 到 5 X 3', 7, -7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "id": "2a08198d-9e87-43ea-a5b4-e2cb53ab7e92",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5],\n",
       "       [-4, -3, -2],\n",
       "       [-1,  0,  1],\n",
       "       [ 2,  3,  4],\n",
       "       [ 5,  6,  7]])"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.reshape(np.reshape(a_1D_array, (3,5)), (5,3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "id": "6bd254fe-9f09-42fa-8511-821cddc7ce0e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5],\n",
       "       [-4, -3, -2],\n",
       "       [-1,  0,  1],\n",
       "       [ 2,  3,  4],\n",
       "       [ 5,  6,  7]])"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(3,5).reshape(5,3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "id": "e529fa84-8b0d-41d6-b053-ef5563cb8b24",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5],\n",
       "       [-4, -3, -2],\n",
       "       [-1,  0,  1],\n",
       "       [ 2,  3,  4],\n",
       "       [ 5,  6,  7]])"
      ]
     },
     "execution_count": 70,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(3,-1).reshape(5,-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "id": "257ec1df-16d5-4c9b-b6e7-cdef2ee8fb4d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -4, -1],\n",
       "       [ 2,  5, -6],\n",
       "       [-3,  0,  3],\n",
       "       [ 6, -5, -2],\n",
       "       [ 1,  4,  7]])"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5_col_order.reshape(5,3)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b289814a-fa6a-4fe0-ba37-722e1d24f03d",
   "metadata": {},
   "source": [
    "### 变成三维 3D"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "429be622-d96e-48ee-ad9c-7b7f875991b9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-13, -12, -11, -10,  -9,  -8,  -7,  -6,  -5,  -4,  -3,  -2,  -1,\n",
       "         0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,\n",
       "        13])"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array_long = np.arange(-13,13 + 1)\n",
    "a_1D_array_long"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "4593c8fd-98ea-401f-a0d6-b909ed360676",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgQAAAApCAYAAABKrzFXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA4xUlEQVR4nO29d5QcxfXH+6nuCTs7M5uzcljlnEAZgRASOYPJyQabYIIJJphgosEgm5yDCRJJBJEkgSQEAuWcw0qr1ea8O7MTurveHz07u7MzGyTbP7933nzP2SN1V9WdW9XdVd+6deuWkFJK4ogjjjjiiCOO/19D+V8rEEccccQRRxxx/O8RJwRxxBFHHHHEEUecEMQRRxxxxBFHHHFCEEccccQRRxxxECcEccQRRxxxxBEHcUIQRxxxxBFHHHEQJwRxxBFHHHHEEQdxQhBHHHHEEUcccRAnBHHEEUccccQRB3FCEEccccQRRxxx8B8mBJpm0BwJ2TAkmmYcsQzdkOh6Szldb5F5RLroBkZrXfQj10VKiW60/LZuSAzjyHXRDRnWxZR55Lo0ywm3bxvdugpDRupitJJ5RHJalWuWc6SQrXRp1u2odJFtdDnKaNyyjZyj0eU/IeM/JkdK86+96y7LM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4VgUDdlYH7mnZGJWNB1A0O2bClVBDEtC51Ba+N41hmZiIXm2XWzLkLEtk50Bt2QZiAOzPZVFNHpoNkWUsqomXBnZCIWDCnDdWn+90h1aZbTGkcjo5k0NaM960RX5LTFkcr5T8iIlmN+CUcjJ2oG28kg1SUZRynHHIybv2pJzOObO5UhQ0SklSriyDtSaeiRugil0wE8thytRQYglCOf3UlDp+3H1NngG1NOhD+BDPscHJkuBhh6pC4xZuFd0kWG2ldKsEQfJd2pDClB0yJ1OYrZs9S0iHFJKErUUcddgdH6/AMJSheWE6J00XUM3Wili/ifWgTa4j9KCOKII4444ogjjv9v4n/juRBHHHHEEUcccfy/CnFCEEccccQRRxxxxAlBHHHEEUccccQRJwRxxBFHHHHEEQdxQhBHHHHEEUcccRAnBHHEEUccccQRB3FCEEccccQRRxxxECcEccQRRxxxxBEHcUIQRxxxxBFHHHEQJwRxxBFHHHHEEQfw/wDFEfs9htyoigAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_1D(a_1D_array_long, '1D数组，27元素')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "id": "ebd40204-bec5-40b9-8c51-8bc7c32e4417",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[-13, -12, -11],\n",
       "        [-10,  -9,  -8],\n",
       "        [ -7,  -6,  -5]],\n",
       "\n",
       "       [[ -4,  -3,  -2],\n",
       "        [ -1,   0,   1],\n",
       "        [  2,   3,   4]],\n",
       "\n",
       "       [[  5,   6,   7],\n",
       "        [  8,   9,  10],\n",
       "        [ 11,  12,  13]]])"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3D_3_by_3_by_3 = a_1D_array_long.reshape(3,3,3)\n",
    "A_3D_3_by_3_by_3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "b420a5f3-2eb2-4a8b-8544-288e0db5f944",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[-13, -12, -11],\n",
       "        [-10,  -9,  -8],\n",
       "        [ -7,  -6,  -5]],\n",
       "\n",
       "       [[ -4,  -3,  -2],\n",
       "        [ -1,   0,   1],\n",
       "        [  2,   3,   4]],\n",
       "\n",
       "       [[  5,   6,   7],\n",
       "        [  8,   9,  10],\n",
       "        [ 11,  12,  13]]])"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array_long.reshape(3,3,-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "id": "51ad0923-b431-4a4c-80df-bd2072af27f8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAK4AAACuCAYAAACvDDbuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAOC0lEQVR4nO3deXTTdbrH8U/b7GnTtOm+0r1iS6FQmGKxzIgII3BVFBn16iDKOXdQ0VmEw5xBcRu9d3SUi8wBUaZeFXEUHUBBFgvIWpQudAO60H2jTbolaZMm8wdOnDpFktLmm+ee5/UX3+SXnqfw7q/fhJP8vOx2ux2MEeMtegDGRoPDZSRxuIwkDpeRxOEykjhcRhKHy0jicBlJHC4jicNlJElcOThzxqbxmsOtzp7+FbIX5okeY8yc3P0QfrriE9FjjIn8LYudOo7PuIwkDpeRxOEykjhcRhKHy0jicBlJHC4jicNlJHG4jCQOl5HE4TKSOFxGEofLSOJwGUkcLiOJw2UkcbiMJA6XkeTSW3fG0s9mx2PxnRORmhqMAK0SSx/YgQsXO4cd8/s1uZieFYXgIDVMJguKz7Viw8aTuFRnEDP0VeRmx+COeclITdRBq1HgwSd24WKt3n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EYSh8tI+gcsJhn4vTFTawAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 200x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3D_3_by_3_by_3[0,:,:], '3D_第一页', 13, -13)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "id": "f82e1a31-4267-4e4f-b877-33588122410a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAK4AAACuCAYAAACvDDbuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAKu0lEQVR4nO3df1DUdR7H8dfyQ37swqIuhmIYHj/0gJT8cSkUZjBGV01mFDnW2fXDyjs7jwLDLiYd036KqdMpWBcVlGVmKf0QDZU8uzzNSSS0SE1BheX3b5bd+8OJDm2KZXf9fN/M6zHDH/t1nX2hT5cv6/Bdnc1ms4FIGDfVA4j6g+GSSAyXRGK4JBLDJZEYLonEcEkkhksiMVwSieGSSB723LmkssFVOy6p+BFGlNe3qZ7hNJEBPjjTVqN6hlME+Zj6dD8+45JIDJdEYrgkEsMlkRguicRwSSSGSyIxXBKJ4ZJIDJdEYrgkEsMlkRguicRwSSSGSyIxXBKJ4ZJIDJdEsutHdy6VvBeXY9fWzUidvxBJt9+lek6/5Oe8gj3bP0XN2TPw8PRE2JjfY85Df0FkdIzqaXaxdFmQu3Y99pX8G1WnKqH302PCHyZh3oKHYBoWqGyX5sI9UFKMirLDCDCp+0NxhuCQUZj32CIEBY9EZ0c7thS8hawFD2Pdpg9hHDxE9bw+a29vx9GyctzzwFyERYahqbEJa55fhcy/ZWB9/qvKdmnqVKGu+hzyV72ABxYvgbu75v5N2SVhxo0YP/lqBAWPRMjoMNz3aBpaW5px/LtjqqfZxeBnwEvrV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n4LbkqMRHmrCmLBhWL4oGZVnG1F69Kzqaf0yfXIIEiZejtBgI0KDjVh490T4envg0LfnVE/rt5Z2Cx5fvx9L5o6Hv6+n6jkANBDuhZqaOwAARj9vxUsc191txbbd36O13YLxY4apntNvS984hIRxQZgapZ3PQfmpwv+z2WxYsfZzTIgJRsToQNVz+q38eC3uSv8IHZ3d8PXxxJrMRIQJPU3Y9uUplJ6ox3tZ01RP6UVT4S7NLkJ5RTXyV89WPcUhocFGbM6eicaWDny29zgWZe/GG8/cKC7eKnMrlud/g9y0qfDydFc9pxfNhLs0uwg7v/geb65ORdAwP9VzHDLI0x2jRpz/JiYmPBCHv6tB3kelWDI/XvEy+5SeqIe5sQO3P13cc6zbasP+o2bk7/gBh3JugbubTsk25eHabDYsXbUDRXuOIW9VKkYOD1A9yelsNhs6u6yqZ9htythAbFk6vdexxRsOIHS4AfffGKEsWkAD4S5ZWYStO8qwdtlM6H08UW0+//qnn8EL3l7a+A7WHi/l7ce1E0YiyKRHS1sXCvdU4D+HzyAna4bqaXbT+3giYmTvvwMfL3cEGAYhYqTal8WUh1uw5WsAwD2Pvt3r+DOLknFbcrSCRY4x17chfeUuVNe2wk8/CJFXDEFO1gzExQarnjagKA/3212Pq57gVMsWXKN6gkvlLdLG56e513GJ+oLhkkgMl0RiuCQSwyWRGC6JxHBJJIZLIjFcEonhkkgMl0RiuCQSwyWRGC6JxHBJJIZLIjFcEonhkkgMl0RiuCQSwyWRdDabzaZ6BJG9+IxLIjFcEonhkkgMl0RiuCQSwyWRGC6JxHBJJIZLIv0Pwp/fRcm/GfYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 200x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3D_3_by_3_by_3[1,:,:], '3D_第二页', 13, -13)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "id": "8656090a-ad6d-4856-a08e-67196ecb2e13",
   "metadata": {},
   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SqVnv8iUKFnzEJZEYLonEcEkkhksiMVwSieGSSAyXRGK4JBLDJZH+Cyc3de03xZOnAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 200x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3D_3_by_3_by_3[2,:,:], '3D_第三页', 13, -13)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e6a5e913-d896-41ff-b285-41b414980fb6",
   "metadata": {},
   "source": [
    "### 视图 vs 副本"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "af0d60ef-bee4-4ca5-bd96-acf44f6dac2f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 判断是否共享内存？\n",
    "np.shares_memory(a_1D_array, A_5_by_3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "e07fab61-db80-4fcf-8574-686301f29aa3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.shares_memory(a_1D_array, a_col_vector)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "c52a7f8f-6263-4bf6-8c38-46eacc6c04e6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.shares_memory(a_1D_array, a_row_vector)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "3791d35d-66fe-4204-999d-2ed1b74f517f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1 2 3 4]\n",
      "[[0 2]\n",
      " [3 4]]\n"
     ]
    }
   ],
   "source": [
    "# 新形状和原始形状的元素数量相同，返回视图\n",
    "a = np.array([[1, 2], [3, 4]])\n",
    "b = a.reshape(4)\n",
    "print(b)     # [1 2 3 4]\n",
    "b[0] = 0\n",
    "print(a)     # [[0 2], [3 4]]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dcac14ab-442d-40c5-bb7d-5b0c113477fc",
   "metadata": {},
   "source": [
    "### 转置"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "id": "9ba216cf-276f-4413-be37-6219a2d4519d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-7, -6, -5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5,  6,  7])"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 一维数组的转置还是其本身\n",
    "a_1D_array.T"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "4c69d085-cbee-4555-ab19-15077af156c1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7],\n",
       "       [-6],\n",
       "       [-5],\n",
       "       [-4],\n",
       "       [-3],\n",
       "       [-2],\n",
       "       [-1],\n",
       "       [ 0],\n",
       "       [ 1],\n",
       "       [ 2],\n",
       "       [ 3],\n",
       "       [ 4],\n",
       "       [ 5],\n",
       "       [ 6],\n",
       "       [ 7]])"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_row_vector.T"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "c974cbdd-db34-4f80-9424-833c2bd48c7c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7],\n",
       "       [-6],\n",
       "       [-5],\n",
       "       [-4],\n",
       "       [-3],\n",
       "       [-2],\n",
       "       [-1],\n",
       "       [ 0],\n",
       "       [ 1],\n",
       "       [ 2],\n",
       "       [ 3],\n",
       "       [ 4],\n",
       "       [ 5],\n",
       "       [ 6],\n",
       "       [ 7]])"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.transpose(a_row_vector)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "cc88af47-cb73-47d8-bb93-7d03a8ba920d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_col_vector.T"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "10f9d123-62e5-4823-86d5-67ea8be0f4a5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.transpose(a_col_vector)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "id": "974ac732-3f16-414c-ae80-8728ea463167",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -2,  3],\n",
       "       [-6, -1,  4],\n",
       "       [-5,  0,  5],\n",
       "       [-4,  1,  6],\n",
       "       [-3,  2,  7]])"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5_T = A_3_by_5.T\n",
    "A_3_by_5_T"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "id": "fa2b9e19-8267-4eaa-9e33-c13b14bc74cf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAJ4AAAD7CAYAAACbvC2SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90b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LzWDV8KJ79kGbqE6mtZv3L6+JHJyc4R0UAu+gEIREd8bSp8Yjbfd2xI8cb83xLDJvZSp+TM3Hqlf7I9BHLT1Oi6nDghEwsDeSRz4jOodVw3N0VsPRufn/SEYYoddqrDCR5YxGI+Z9noYfUvLweWI/hPi7So9kkYiJI9FYXIb8bXtE5xB9jadpqMf+b1YhumdvuHr6oL6mCinfbUJVWQk63dVPcrRrmvtZKrb+JxdLX+gDFyc7lFTUAwDc1PZwclDES+ZrU6nQfuJInF+5CUa9XnQU0b8pGxsblObl4uc936OuqhLObu4IjuyICW8uhn9Yu+b/AAFrdmcDAB57a4/Z/j+n9sTIvsqc+VeBA3vDpW0bnBd8N/sr0fDsHBwx6pV5kiNY7MyqUdIj3LDCXQcUc3cCRX0fj24dDI9EMDwSwfBIBMMjEQyPRDA8EsHwSATDIxEMj0QwPBLB8EgEwyMRDI9EMDwSwfBIBMMjEQyPRPD0RhLBZzwSwfBIBMMjEQyPRDA8EsHwSATDIxEMj0QwPBLxXzS/GVdCb8iEAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 200x300 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3_by_5_T, '矩阵，3 x 5, 转置', 7, -7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "id": "4c3e0d3b-d2dd-48d1-abe3-0926d566eba1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -2,  3],\n",
       "       [-6, -1,  4],\n",
       "       [-5,  0,  5],\n",
       "       [-4,  1,  6],\n",
       "       [-3,  2,  7]])"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.transpose(A_3_by_5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "id": "419af092-4f6a-418b-943e-1e5b98e8ce32",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "原始数组：\n",
      "[[  1   2 200]\n",
      " [100   5   6]]\n",
      "使用.transpose()方法得到的数组的转置：\n",
      "[[  1 100]\n",
      " [  2   5]\n",
      " [200   6]]\n",
      "使用.T属性得到的数组的转置：\n",
      "[[  1 100]\n",
      " [  2   5]\n",
      " [200   6]]\n"
     ]
    }
   ],
   "source": [
    "# 视图 vs 副本\n",
    "# 定义一个二维数组\n",
    "arr = np.array([[1, 2, 3], [4, 5, 6]])\n",
    "\n",
    "# 使用.transpose()方法得到数组的转置\n",
    "arr_transpose = arr.transpose()\n",
    "\n",
    "# 使用.T属性得到数组的转置\n",
    "arr_T = arr.T\n",
    "\n",
    "# 修改新数组中的元素\n",
    "arr_transpose[0, 1] = 100\n",
    "arr_T[2, 0] = 200\n",
    "\n",
    "# 输出结果\n",
    "print(\"原始数组：\")\n",
    "print(arr)\n",
    "print(\"使用.transpose()方法得到的数组的转置：\")\n",
    "print(arr_transpose)\n",
    "print(\"使用.T属性得到的数组的转置：\")\n",
    "print(arr_T)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d467a732-1c65-4c03-8f37-313e035e0458",
   "metadata": {},
   "source": [
    "### 扁平化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "id": "664acacf-18e2-45eb-844d-2049b57d09cb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-7, -6, -5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5,  6,  7])"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5.ravel()\n",
    "# 需要注意的是，ravel()函数返回的是原始数组的视图（view），而不是其副本（copy）。\n",
    "# 因此，如果修改新数组中的任何元素，原始数组也会受到影响。\n",
    "# 如果需要返回一个数组副本，可以使用flatten()函数。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "id": "d8d54076-1bb3-4d9d-8256-9c13e69fa70a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(15,)"
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5.ravel().shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 122,
   "id": "63a887f7-aea1-48de-bee5-40c7163c806f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 122,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5.ravel().ndim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "id": "c886001a-1ac7-4704-8be0-d752e2c01992",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-7, -6, -5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5,  6,  7])"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5.reshape(-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "id": "5aaa1e0e-63de-4370-904c-50447abe4926",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-7, -2,  3, -6, -1,  4, -5,  0,  5, -4,  1,  6, -3,  2,  7])"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5.ravel(order = 'F')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "id": "c7d7b932-9e09-4551-a253-e881090286db",
   "metadata": {},
   "outputs": [],
   "source": [
    "A_3_by_5_flatten = A_3_by_5.flatten()\n",
    "# A_3_by_5_flatten是A_3_by_5的副本"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "id": "89c6723b-8f68-49ba-adb0-462e249fc737",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1000,   -6,   -5,   -4,   -3,   -2,   -1,    0,    1,    2,    3,\n",
       "          4,    5,    6,    7])"
      ]
     },
     "execution_count": 116,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5_flatten[0] = 1000\n",
    "A_3_by_5_flatten"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "id": "d50256e3-5cda-4150-8d2f-2c0554b3dd30",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3],\n",
       "       [-2, -1,  0,  1,  2],\n",
       "       [ 3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 117,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5\n",
    "# A_3_by_5并没有变化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "id": "f94a16e3-a033-4751-af78-5d068a46d7dd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "原始数组：\n",
      "[[200   2   3]\n",
      " [  4   5   6]]\n",
      "使用flatten()函数得到的一维数组：\n",
      "[   1    2    3    4    5 1000]\n",
      "使用ravel()函数得到的一维数组：\n",
      "[200   2   3   4   5   6]\n"
     ]
    }
   ],
   "source": [
    "# 视图 vs 副本\n",
    "\n",
    "# 定义一个多维数组\n",
    "arr = np.array([[1, 2, 3], [4, 5, 6]])\n",
    "\n",
    "# 使用flatten()函数将多维数组降为一维数组\n",
    "new_arr1 = arr.flatten()\n",
    "\n",
    "# 使用ravel()函数将多维数组降为一维数组\n",
    "new_arr2 = arr.ravel()\n",
    "\n",
    "# 修改新数组中的元素\n",
    "new_arr1[-1] = 1000\n",
    "new_arr2[0] = 200\n",
    "\n",
    "# 输出结果\n",
    "print(\"原始数组：\")\n",
    "print(arr)\n",
    "print(\"使用flatten()函数得到的一维数组：\")\n",
    "print(new_arr1)\n",
    "print(\"使用ravel()函数得到的一维数组：\")\n",
    "print(new_arr2)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "221b67bc-102c-4899-b921-a8a34d91b306",
   "metadata": {},
   "source": [
    "### 旋转"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "id": "0188bdac-cdad-4594-ac29-43f88d163623",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3],\n",
       "       [-2, -1,  0,  1,  2],\n",
       "       [ 3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 136,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3_by_5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "id": "de1fae7f-409b-4121-a0b9-4ad459b60701",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-3,  2,  7],\n",
       "       [-4,  1,  6],\n",
       "       [-5,  0,  5],\n",
       "       [-6, -1,  4],\n",
       "       [-7, -2,  3]])"
      ]
     },
     "execution_count": 123,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.rot90(A_3_by_5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "id": "8f48a2aa-9725-4359-8c5b-1f4ff23eea91",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAJ4AAAD7CAYAAACbvC2SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAARFUlEQVR4nO3de3zO9f/H8ee1866dD3ayzdgBMzSRYomi5Bf5qhy7lVNE5/oW360o6qv8WvJF5VuSIpSQY5HC8HWYjYyxGTZ2vDY7n67j749uXb4XZrv02/X6lOf9dnO79fm4yvOmx23XdbnZ9VaZTCYTiGzMTnoA3ZoYHolgeCSC4ZEIhkciGB6JYHgkguGRCIZHIhgeiXCw5sErMwpba0ereTwuGKYjb0jPsJqq11x8reooPeOmjDWdafYx/IpHIhgeiWB4JILhkQiGRyIYHolgeC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NsEh+GpvqvQMq7z9cAfpCRYU8VRLtx6GRyIYHolgeCSC4ZEIhkciGB6JYHgkguGRCIZHIhgeiWB4JILhkQiGRyIYHolgeCSC4ZEIhkcieHojieBXPBLB8EgEwyMRDI9EMDwSwfBIBMMjEQyPRDA8EvF/5VkZVxmhJOkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 200x300 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(np.rot90(A_3_by_5), '逆时针旋转90度', 7, -7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "id": "a7c4ca6b-8a82-428a-b41d-0e4cc7c9f622",
   "metadata": {},
   "outputs": [],
   "source": [
    "A_3_by_5_anti_c_90 = np.rot90(A_3_by_5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "id": "3a3d81e1-7f32-4ed9-8300-71505a1f9e1d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "原数组：\n",
      "[[  1 100]\n",
      " [  3   4]]\n",
      "修改后的视图：\n",
      "[[100   4]\n",
      " [  1   3]]\n"
     ]
    }
   ],
   "source": [
    "# 视图 vs 副本\n",
    "\n",
    "# 创建一个 2x2 的二维数组\n",
    "arr = np.array([[1, 2], [3, 4]])\n",
    "\n",
    "# 将数组逆时针旋转90度，得到数组的视图\n",
    "rotated_arr = np.rot90(arr)\n",
    "\n",
    "# 修改视图的值\n",
    "rotated_arr[0, 0] = 100\n",
    "\n",
    "# 打印原数组和修改后的视图\n",
    "print(\"原数组：\")\n",
    "print(arr)\n",
    "\n",
    "print(\"修改后的视图：\")\n",
    "print(rotated_arr)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "96628e7b-7ab6-4733-a3cb-0e4e4c60f200",
   "metadata": {},
   "source": [
    "### 翻转"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 137,
   "id": "42c5f793-2736-4211-9ddd-b90d61aa1159",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 7,  6,  5,  4,  3],\n",
       "       [ 2,  1,  0, -1, -2],\n",
       "       [-3, -4, -5, -6, -7]])"
      ]
     },
     "execution_count": 137,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.flip(A_3_by_5)\n",
    "# 沿着所有轴翻转"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "id": "214cd0a7-58a9-4f90-ae7d-be4024b8e9f2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPwAAACfCAYAAADdy7STAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAQQ0lEQVR4nO3deVTU9eLG8WcY1mFfZBMQFVARNUvLlFATs7xXb9cWt065pdlu/lKD0sq8Wjcrr7ZQYVaaVqZWiqVpmuh1QdEEERBFlHXYl2GZ7f7RaWxaYIZfzWf087zO8Zw+X6d8LN/MDMSMwmg0GkFEUnAQPYCIbIfBE0mEwRNJhMETSYTBE0mEwRNJhMETSYTBE0mEwRNJhMETScTRmht/ouj1V+34S00x5uJIz96iZ1jtpoKzuDx2kOgZnRKWlgHNgttFz7Ca6pVvoP/kftEzOkU55aMOb8N7eCKJMHgiiTB4IokweCKJMHgiiTB4IokweCKJMHgiiTB4IokweCKJMHgiiTB4IokweCKJMHgiiTB4IolY9f3wf6bxF/bAIzLsN9fz3tyAjEdfFLDIck5BgYhY8H/wHp4AB1cXtFwoxPlnnoUmK1v0tHZ5TZ0Nr6mzza7pqytRet/V9X3rjiMnwvmO6dAe2Art1ymi57Rr07FybMooR3FtKwAgKlCFuQldkRDtI2SPsOC/HXw3FEql6ewdF41R361D0effiJpkEaWXF/p+thH1h48gd8aD0FZVw7VbOPT19aKnWURbWAB18sNXLu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2l6HbDcEQOvtXW8/5Qi1aPltr270k8XB3h7+mK2ib7+Xfe3KJDcYvO7NrZwhqEB3uaXQsP8kB5lcaW0zqk0Wih+YNPiP5jXB+cyalAfn6VjVf9ROhz+LaWZqR/sR4xg4fCw8cfzY31yPhmG+qr1Ohz8wiR0zrk4u4JF3fzP3wOSiVcPX3gGdhV0KqOuTg54O6hkTiaV4maplZ08XLFpFu6o6FZi2P59vOw+Pds+iYXSx4aglN5lTh5tgI3xgVj6IAQPPnK1fHa/e7uThg9qideW3VI2AahwTs4OKCyuAg/7vsWmvo6uHl6ITSqN6a9tBqBEd1FTrtmGYxAeIA7bokNgruLI2qa2nCmqBartuegRWv755TWSM8swWsfn8DUsb3w+OTrcKmsAYvf+i9OnxNzb2mtMaOjAQXw7a58YRuEBu/o7IJ7FywVOeFPZS/P29uj1Rmw4ovTHd/QTu1ML8TO9ELRMzply7Yz2LLtjNAN/H/piSTC4IkkwuCJJMLgiSTC4IkkwuCJJMLgiSTC4IkkwuCJJMLgiSTC4IkkwuCJJMLgiSTC4IkkwuCJJMLgiSTC4IkkwuCJJKIwGo32+c4DRPSn4z08kUQYPJFEGDyRRBg8kUQYPJFEGDyRRBg8kUQYPJFEGDyRRP4HYuj2UoL9gDMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 300x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(np.flip(A_3_by_5), '沿着所有轴翻转', 7, -7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "21d5ae3a-16bd-4f18-b12b-960f35934ad7",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 沿着指定的轴翻转\n",
    "\n",
    "# 沿着指定轴进行翻转\n",
    "arr3 = np.array([[1, 2], [3, 4], [5, 6]])\n",
    "flipped_arr3 = np.flip(arr3, axis=0)  # 沿着第一个轴进行翻转\n",
    "print(flipped_arr3)\n",
    "# 输出 [[5 6] [3 4] [1 2]]\n",
    "\n",
    "flipped_arr4 = np.flip(arr3, axis=1)  # 沿着第二个轴进行翻转\n",
    "print(flipped_arr4)\n",
    "# 输出 [[2 1] [4 3] [6 5]]\n",
    "\n",
    "flipped_arr5 = np.flip(arr3, axis=(0, 1))  # 沿着所有轴进行翻转\n",
    "print(flipped_arr5)\n",
    "# 输出 [[6 5] [4 3] [2 1]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "id": "1295c28e-d630-40ff-81bd-a51ec2481cd8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 3,  4,  5,  6,  7],\n",
       "       [-2, -1,  0,  1,  2],\n",
       "       [-7, -6, -5, -4, -3]])"
      ]
     },
     "execution_count": 139,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.flipud(A_3_by_5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "id": "7d311dfb-39d1-4482-bd0c-51a60758438e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-3, -4, -5, -6, -7],\n",
       "       [ 2,  1,  0, -1, -2],\n",
       "       [ 7,  6,  5,  4,  3]])"
      ]
     },
     "execution_count": 140,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.fliplr(A_3_by_5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2a76d332-aee9-4e69-b1d7-20b5eac340a5",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Repo: https://github.com/Visualize-ML\n",
    "# Book 1 Python for Beginners  |  From Basic Arithmetic to Machine Learning\n",
    "# Published and copyrighted by Tsinghua University Press\n",
    "# Beijing, China, 2023"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
